﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
namespace GMPP.Import
{
    public class Importer
    {
        public string path{set;get;}


        public string TexturePath { set; get; }

        public string Extension;

        public StreamReader sr;


        public Importer()
        {

        }

        protected void Init()
        {
            try
            {
                Extension = Path.GetExtension(path);

                this.TexturePath = Path.GetDirectoryName(path);


               
                sr = new StreamReader(path, System.Text.Encoding.ASCII);
            }
            catch (System.IO.FileNotFoundException)
            {
                MessageBox.Show("Could not load " + path + ".  Please make sure that Data is a subfolder from where the application is running.", "Error", MessageBoxButtons.OK);

            }
            catch (System.IO.DirectoryNotFoundException)
            {
                MessageBox.Show("Could not load " + path + ".  Please make sure that Data is a subfolder from where the application is running.", "Error", MessageBoxButtons.OK);

            }

        }

    }
}
